<?php
namespace app\common\model;

use think\Model;

class Member extends Model
{
    //车辆列表
    public function member($page,$limit){
        $list = db('member')
            ->alias('m')
            ->join("company c","c.company_id = m.company_id","left")
            ->join("department d","d.department_id = m.department_id","left")
            ->where('m.member_status',1)
            ->page($page,$limit)
            ->select();
        $count = db('member')
            ->alias('m')
            ->join("company c","c.company_id = m.company_id","left")
            ->join("department d","d.department_id = m.department_id","left")
            ->where('m.member_status',1)
            ->count();
        return ['count' => $count,'data' => $list];
    }

}